package com.lzh.eventdemo;

/**
 * @author by lzh
 * @Classname StringFormatTest
 * @Description TODO
 * @Date 2024/12/11 15:38
 */
public class StringFormatTest {
    public static void main(String[] args) {
        String URI = "%s/%s.json%s";
        String url = getUrl(URI, "tasks");
        System.out.println("url = " + url);
    }

    static String getUrl(String format, String pageRegex) {
        String url = "http://localhost:8080/api";
        return String.format(format, url, pageRegex, "");
    }
}
